
/**
 * Date:2019年6月4日下午3:07:44
 * Copyright (c) 2019, www.bwbroad.com All Rights Reserved.
 *
*/

package com.xue.im.client.ui.list;

import java.util.ArrayList;
import java.util.List;

import javax.swing.AbstractListModel;

import com.xue.im.common.vo.User;

/**
 * Description: TODO <br/>
 * Date: 2019年6月4日 下午3:07:44 <br/>
 * 
 * @author xuejianxin
 */
public class UserListModel extends AbstractListModel<User> {
	private static final long serialVersionUID = 1L;
	private List<User> list = new ArrayList<User>();

	public List<User> getList() {
		return list;
	}

	public void setList(List<User> list) {
		this.list.addAll(list);
	}

	public void addElement(User u) {
		this.list.add(u);
	}

	public int getSize() {
		return list.size();
	}

	public User getElementAt(int index) {
		return list.get(index);
	}
}